home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 3006 / 3006.xpi / chrome / dwhelper.jar / content / donate.xul < prev    next >
Extensible Markup Language  |  2010-01-15  |  2KB  |  69 lines

  1. <?xml version="1.0"?> 
  2. <!-- *****************************************************************************
  3.  *            Copyright (c) 2006-2009 Michel Gutierrez. All Rights Reserved.
  4.  ****************************************************************************** -->
  5. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
  6. <?xml-stylesheet href="chrome://dwhelper/skin/dwhelper.css" type="text/css"?>
  7. <?xml-stylesheet href="chrome://dwhelper/content/bindings.css" type="text/css"?>
  8.  
  9. <!DOCTYPE window SYSTEM "chrome://dwhelper/locale/dwhelper.dtd" >
  10.  
  11. <dialog id="dwhelper-donate"
  12.         title="&title.support-dev;"
  13.         flex="1"
  14.         ondialogaccept="return doOk();"
  15.         onload="onLoad()"
  16.         onunload="onUnload()"
  17.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  18.         xmlns:html="http://www.w3.org/1999/xhtml"
  19.         buttons="accept,cancel"
  20.         >
  21.  
  22.     <script type="application/x-javascript"
  23.         src="chrome://dwhelper/content/dwhutil.js" />
  24.  
  25.     <script><![CDATA[
  26. var pref=Components.classes["@mozilla.org/preferences-service;1"]
  27.     .getService(Components.interfaces.nsIPrefService).getBranch("dwhelper.");
  28.  
  29. function onLoad() {
  30.     var count=pref.getIntPref("download-count");
  31.     document.getElementById("download-count").appendChild(document.createTextNode(
  32.         DWHUtil.getFText("message.just-downloaded",[""+count])));
  33.     document.getElementById("donate-message").appendChild(document.createTextNode(
  34.         DWHUtil.getText("message.req-donate")));
  35. }
  36.  
  37. function onUnload() {
  38.     var notAgain=document.getElementById("not-again").checked;
  39.     if(notAgain) {
  40.         pref.setBoolPref("donate-not-again",true);
  41.     }
  42. }
  43.  
  44. function doOk() {
  45.       var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
  46.                 .getService(Components.interfaces.nsIWindowMediator);
  47.     var w = wm.getMostRecentWindow("navigator:browser");
  48.     var browser = w.top.getBrowser();
  49.     browser.selectedTab=browser.addTab("http://www.downloadhelper.net/donate.php");
  50. }
  51.  
  52. ]]>
  53.     </script>
  54.  
  55.  
  56.     <vbox>
  57.     
  58.         <description id="congratulations" value="&label.congratulations;"/>
  59.         
  60.         <description id="download-count"/>
  61.  
  62.         <description id="donate-message"/>
  63.         
  64.         <checkbox id="not-again" label="&label.donate-not-again;"/>
  65.     
  66.     </vbox>
  67.  
  68. </dialog>
  69.